<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:com="gme://caGrid.caBIG/1.0/gov.nih.nci.cagrid.metadata.common" elementFormDefault="qualified" targetNamespace="gme://caGrid.caBIG/1.0/gov.nih.nci.cagrid.metadata.common" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Enumeration" type="com:Enumeration" />
  <xs:complexType name="Enumeration">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="com:SemanticMetadata" />
    </xs:sequence>
    <xs:attribute name="permissibleValue" type="xs:string" use="required" />
    <xs:attribute name="valueMeaning" type="xs:string" use="required" />
  </xs:complexType>
  <xs:element name="ValueDomain" type="com:ValueDomain" />
  <xs:complexType name="ValueDomain">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="com:SemanticMetadata" />
      <xs:element name="enumerationCollection">
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" ref="com:Enumeration" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="longName" type="xs:string" use="required" />
    <xs:attribute name="unitOfMeasure" type="xs:string" use="optional" />
  </xs:complexType>
  <xs:element name="SemanticMetadata" type="com:SemanticMetadata" />
  <xs:complexType name="SemanticMetadata">
    <xs:sequence />
    <xs:attribute name="conceptCode" type="xs:string" use="required" />
    <xs:attribute name="conceptDefinition" type="xs:string" use="required" />
    <xs:attribute name="conceptName" type="xs:string" use="required" />
    <xs:attribute name="order" type="xs:int" use="optional" />
    <xs:attribute name="orderLevel" type="xs:int" use="optional" />
  </xs:complexType>
  <xs:element name="PointOfContact" type="com:PointOfContact" />
  <xs:complexType name="PointOfContact">
    <xs:annotation>
      <xs:documentation>For the static model, instances of these should be the POCs associated with the design and implementation of the service itself (not deployments of it, e.g. not system support staff)

The "role" attribute should probably be an enumeration of known types</xs:documentation>
    </xs:annotation>
    <xs:sequence />
    <xs:attribute name="affiliation" type="xs:string" use="required" />
    <xs:attribute name="email" type="xs:string" use="required" />
    <xs:attribute name="firstName" type="xs:string" use="required" />
    <xs:attribute name="lastName" type="xs:string" use="required" />
    <xs:attribute name="phoneNumber" type="xs:string" use="optional" />
    <xs:attribute name="role" type="xs:string" use="required" />
  </xs:complexType>
  <xs:element name="UMLClass" type="com:UMLClass" />
  <xs:complexType name="UMLClass">
    <xs:annotation>
      <xs:documentation>caDSR-related

Represents the UML Class of the given input or output.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="umlAttributeCollection">
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" ref="com:UMLAttribute" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="com:SemanticMetadata" />
    </xs:sequence>
    <xs:attribute name="className" type="xs:string" use="required" />
    <xs:attribute name="description" type="xs:string" use="required" />
    <xs:attribute name="id" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>This is used soley for the purposes of referencing this class in associations.  It does not represent any caDSR identifier.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="packageName" type="xs:string" use="required" />
    <xs:attribute name="projectName" type="xs:string" use="required" />
    <xs:attribute name="projectVersion" type="xs:string" use="required" />
  </xs:complexType>
  <xs:element name="UMLAttribute" type="com:UMLAttribute" />
  <xs:complexType name="UMLAttribute">
    <xs:annotation>
      <xs:documentation>caDSR-related

Represents a UML attribute of the parent UML Class.  Indication of isRequired=false means the operation will function without the existence of this attribute.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="com:SemanticMetadata" />
      <xs:element minOccurs="0" ref="com:ValueDomain" />
    </xs:sequence>
    <xs:attribute name="dataTypeName" type="xs:string" use="required" />
    <xs:attribute name="description" type="xs:string" use="required" />
    <xs:attribute name="name" type="xs:string" use="required" />
    <xs:attribute name="publicID" type="xs:long" use="required" />
    <xs:attribute name="version" type="xs:float" use="required" />
  </xs:complexType>
  <xs:element name="ResearchCenter" type="com:ResearchCenter" />
  <xs:complexType name="ResearchCenter">
    <xs:sequence>
      <xs:element minOccurs="0" ref="com:Address" />
      <xs:element minOccurs="0" ref="com:ResearchCenterDescription" />
      <xs:element name="pointOfContactCollection">
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" maxOccurs="unbounded" ref="com:PointOfContact" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="displayName" type="xs:string" use="required" />
    <xs:attribute name="shortName" type="xs:string" use="required" />
  </xs:complexType>
  <xs:element name="Address" type="com:Address" />
  <xs:complexType name="Address">
    <xs:sequence />
    <xs:attribute name="country" type="xs:string" use="required" />
    <xs:attribute name="locality" type="xs:string" use="optional" />
    <xs:attribute name="postalCode" type="xs:string" use="optional" />
    <xs:attribute name="stateProvince" type="xs:string" use="optional" />
    <xs:attribute name="street1" type="xs:string" use="required" />
    <xs:attribute name="street2" type="xs:string" use="optional" />
  </xs:complexType>
  <xs:element name="ResearchCenterDescription" type="com:ResearchCenterDescription" />
  <xs:complexType name="ResearchCenterDescription">
    <xs:sequence />
    <xs:attribute name="description" type="xs:string" use="required" />
    <xs:attribute name="homepageURL" type="xs:string" use="required" />
    <xs:attribute name="imageURL" type="xs:string" use="optional" />
    <xs:attribute name="rssNewsURL" type="xs:string" use="optional" />
  </xs:complexType>
</xs:schema>